package com.sxt.controller;

import com.sxt.domain.MyResult;
import com.sxt.pojo.User;
import com.sxt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/login")
    public MyResult userLogin(User user) {
        return userService.userLogin(user.getUsername(), user.getPassword());
    }

}
